Optimal. Leaf size=268 \[ -\frac{b B (c+d x)^2 \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{2 g^3 (a+b x)^2 (b c-a d)^2}+\frac{2 B d (c+d x) \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{g^3 (a+b x) (b c-a d)^2}-\frac{b (c+d x)^2 \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )^2}{2 g^3 (a+b x)^2 (b c-a d)^2}+\frac{d (c+d x) \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )^2}{g^3 (a+b x) (b c-a d)^2}-\frac{b B^2 (c+d x)^2}{4 g^3 (a+b x)^2 (b c-a d)^2}+\frac{2 B^2 d (c+d x)}{g^3 (a+b x) (b c-a d)^2} \]
[Out]
________________________________________________________________________________________
Rubi [C] time = 0.90955, antiderivative size = 577, normalized size of antiderivative = 2.15, number of steps used = 30, number of rules used = 11, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.344, Rules used = {2525, 12, 2528, 44, 2524, 2418, 2390, 2301, 2394, 2393, 2391} \[ \frac{B^2 d^2 \text{PolyLog}\left (2,-\frac{d (a+b x)}{b c-a d}\right )}{b g^3 (b c-a d)^2}+\frac{B^2 d^2 \text{PolyLog}\left (2,\frac{b (c+d x)}{b c-a d}\right )}{b g^3 (b c-a d)^2}+\frac{B d^2 \log (a+b x) \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{b g^3 (b c-a d)^2}-\frac{B d^2 \log (c+d x) \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{b g^3 (b c-a d)^2}+\frac{B d \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{b g^3 (a+b x) (b c-a d)}-\frac{B \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{2 b g^3 (a+b x)^2}-\frac{\left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )^2}{2 b g^3 (a+b x)^2}-\frac{B^2 d^2 \log ^2(a+b x)}{2 b g^3 (b c-a d)^2}-\frac{B^2 d^2 \log ^2(c+d x)}{2 b g^3 (b c-a d)^2}+\frac{3 B^2 d^2 \log (a+b x)}{2 b g^3 (b c-a d)^2}+\frac{B^2 d^2 \log (c+d x) \log \left (-\frac{d (a+b x)}{b c-a d}\right )}{b g^3 (b c-a d)^2}-\frac{3 B^2 d^2 \log (c+d x)}{2 b g^3 (b c-a d)^2}+\frac{B^2 d^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right )}{b g^3 (b c-a d)^2}+\frac{3 B^2 d}{2 b g^3 (a+b x) (b c-a d)}-\frac{B^2}{4 b g^3 (a+b x)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2525
Rule 12
Rule 2528
Rule 44
Rule 2524
Rule 2418
Rule 2390
Rule 2301
Rule 2394
Rule 2393
Rule 2391
Rubi steps
\begin{align*} \int \frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{(a g+b g x)^3} \, dx &=-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}+\frac{B \int \frac{(b c-a d) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{g^2 (a+b x)^3 (c+d x)} \, dx}{b g}\\ &=-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}+\frac{(B (b c-a d)) \int \frac{A+B \log \left (\frac{e (a+b x)}{c+d x}\right )}{(a+b x)^3 (c+d x)} \, dx}{b g^3}\\ &=-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}+\frac{(B (b c-a d)) \int \left (\frac{b \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{(b c-a d) (a+b x)^3}-\frac{b d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{(b c-a d)^2 (a+b x)^2}+\frac{b d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{(b c-a d)^3 (a+b x)}-\frac{d^3 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{(b c-a d)^3 (c+d x)}\right ) \, dx}{b g^3}\\ &=-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}+\frac{B \int \frac{A+B \log \left (\frac{e (a+b x)}{c+d x}\right )}{(a+b x)^3} \, dx}{g^3}+\frac{\left (B d^2\right ) \int \frac{A+B \log \left (\frac{e (a+b x)}{c+d x}\right )}{a+b x} \, dx}{(b c-a d)^2 g^3}-\frac{\left (B d^3\right ) \int \frac{A+B \log \left (\frac{e (a+b x)}{c+d x}\right )}{c+d x} \, dx}{b (b c-a d)^2 g^3}-\frac{(B d) \int \frac{A+B \log \left (\frac{e (a+b x)}{c+d x}\right )}{(a+b x)^2} \, dx}{(b c-a d) g^3}\\ &=-\frac{B \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b g^3 (a+b x)^2}+\frac{B d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d) g^3 (a+b x)}+\frac{B d^2 \log (a+b x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d)^2 g^3}-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac{B d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \log (c+d x)}{b (b c-a d)^2 g^3}+\frac{B^2 \int \frac{b c-a d}{(a+b x)^3 (c+d x)} \, dx}{2 b g^3}-\frac{\left (B^2 d^2\right ) \int \frac{(c+d x) \left (-\frac{d e (a+b x)}{(c+d x)^2}+\frac{b e}{c+d x}\right ) \log (a+b x)}{e (a+b x)} \, dx}{b (b c-a d)^2 g^3}+\frac{\left (B^2 d^2\right ) \int \frac{(c+d x) \left (-\frac{d e (a+b x)}{(c+d x)^2}+\frac{b e}{c+d x}\right ) \log (c+d x)}{e (a+b x)} \, dx}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d\right ) \int \frac{b c-a d}{(a+b x)^2 (c+d x)} \, dx}{b (b c-a d) g^3}\\ &=-\frac{B \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b g^3 (a+b x)^2}+\frac{B d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d) g^3 (a+b x)}+\frac{B d^2 \log (a+b x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d)^2 g^3}-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac{B d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d\right ) \int \frac{1}{(a+b x)^2 (c+d x)} \, dx}{b g^3}+\frac{\left (B^2 (b c-a d)\right ) \int \frac{1}{(a+b x)^3 (c+d x)} \, dx}{2 b g^3}-\frac{\left (B^2 d^2\right ) \int \frac{(c+d x) \left (-\frac{d e (a+b x)}{(c+d x)^2}+\frac{b e}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{b (b c-a d)^2 e g^3}+\frac{\left (B^2 d^2\right ) \int \frac{(c+d x) \left (-\frac{d e (a+b x)}{(c+d x)^2}+\frac{b e}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{b (b c-a d)^2 e g^3}\\ &=-\frac{B \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b g^3 (a+b x)^2}+\frac{B d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d) g^3 (a+b x)}+\frac{B d^2 \log (a+b x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d)^2 g^3}-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac{B d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d\right ) \int \left (\frac{b}{(b c-a d) (a+b x)^2}-\frac{b d}{(b c-a d)^2 (a+b x)}+\frac{d^2}{(b c-a d)^2 (c+d x)}\right ) \, dx}{b g^3}+\frac{\left (B^2 (b c-a d)\right ) \int \left (\frac{b}{(b c-a d) (a+b x)^3}-\frac{b d}{(b c-a d)^2 (a+b x)^2}+\frac{b d^2}{(b c-a d)^3 (a+b x)}-\frac{d^3}{(b c-a d)^3 (c+d x)}\right ) \, dx}{2 b g^3}-\frac{\left (B^2 d^2\right ) \int \left (\frac{b e \log (a+b x)}{a+b x}-\frac{d e \log (a+b x)}{c+d x}\right ) \, dx}{b (b c-a d)^2 e g^3}+\frac{\left (B^2 d^2\right ) \int \left (\frac{b e \log (c+d x)}{a+b x}-\frac{d e \log (c+d x)}{c+d x}\right ) \, dx}{b (b c-a d)^2 e g^3}\\ &=-\frac{B^2}{4 b g^3 (a+b x)^2}+\frac{3 B^2 d}{2 b (b c-a d) g^3 (a+b x)}+\frac{3 B^2 d^2 \log (a+b x)}{2 b (b c-a d)^2 g^3}-\frac{B \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b g^3 (a+b x)^2}+\frac{B d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d) g^3 (a+b x)}+\frac{B d^2 \log (a+b x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d)^2 g^3}-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac{3 B^2 d^2 \log (c+d x)}{2 b (b c-a d)^2 g^3}-\frac{B d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d^2\right ) \int \frac{\log (a+b x)}{a+b x} \, dx}{(b c-a d)^2 g^3}+\frac{\left (B^2 d^2\right ) \int \frac{\log (c+d x)}{a+b x} \, dx}{(b c-a d)^2 g^3}+\frac{\left (B^2 d^3\right ) \int \frac{\log (a+b x)}{c+d x} \, dx}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d^3\right ) \int \frac{\log (c+d x)}{c+d x} \, dx}{b (b c-a d)^2 g^3}\\ &=-\frac{B^2}{4 b g^3 (a+b x)^2}+\frac{3 B^2 d}{2 b (b c-a d) g^3 (a+b x)}+\frac{3 B^2 d^2 \log (a+b x)}{2 b (b c-a d)^2 g^3}-\frac{B \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b g^3 (a+b x)^2}+\frac{B d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d) g^3 (a+b x)}+\frac{B d^2 \log (a+b x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d)^2 g^3}-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac{3 B^2 d^2 \log (c+d x)}{2 b (b c-a d)^2 g^3}+\frac{B^2 d^2 \log \left (-\frac{d (a+b x)}{b c-a d}\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{B d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \log (c+d x)}{b (b c-a d)^2 g^3}+\frac{B^2 d^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right )}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d^2\right ) \int \frac{\log \left (\frac{b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{(b c-a d)^2 g^3}-\frac{\left (B^2 d^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,a+b x\right )}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,c+d x\right )}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d^3\right ) \int \frac{\log \left (\frac{d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{b (b c-a d)^2 g^3}\\ &=-\frac{B^2}{4 b g^3 (a+b x)^2}+\frac{3 B^2 d}{2 b (b c-a d) g^3 (a+b x)}+\frac{3 B^2 d^2 \log (a+b x)}{2 b (b c-a d)^2 g^3}-\frac{B^2 d^2 \log ^2(a+b x)}{2 b (b c-a d)^2 g^3}-\frac{B \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b g^3 (a+b x)^2}+\frac{B d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d) g^3 (a+b x)}+\frac{B d^2 \log (a+b x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d)^2 g^3}-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac{3 B^2 d^2 \log (c+d x)}{2 b (b c-a d)^2 g^3}+\frac{B^2 d^2 \log \left (-\frac{d (a+b x)}{b c-a d}\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{B d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{B^2 d^2 \log ^2(c+d x)}{2 b (b c-a d)^2 g^3}+\frac{B^2 d^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right )}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{b (b c-a d)^2 g^3}-\frac{\left (B^2 d^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{b (b c-a d)^2 g^3}\\ &=-\frac{B^2}{4 b g^3 (a+b x)^2}+\frac{3 B^2 d}{2 b (b c-a d) g^3 (a+b x)}+\frac{3 B^2 d^2 \log (a+b x)}{2 b (b c-a d)^2 g^3}-\frac{B^2 d^2 \log ^2(a+b x)}{2 b (b c-a d)^2 g^3}-\frac{B \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b g^3 (a+b x)^2}+\frac{B d \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d) g^3 (a+b x)}+\frac{B d^2 \log (a+b x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{b (b c-a d)^2 g^3}-\frac{\left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac{3 B^2 d^2 \log (c+d x)}{2 b (b c-a d)^2 g^3}+\frac{B^2 d^2 \log \left (-\frac{d (a+b x)}{b c-a d}\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{B d^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \log (c+d x)}{b (b c-a d)^2 g^3}-\frac{B^2 d^2 \log ^2(c+d x)}{2 b (b c-a d)^2 g^3}+\frac{B^2 d^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right )}{b (b c-a d)^2 g^3}+\frac{B^2 d^2 \text{Li}_2\left (-\frac{d (a+b x)}{b c-a d}\right )}{b (b c-a d)^2 g^3}+\frac{B^2 d^2 \text{Li}_2\left (\frac{b (c+d x)}{b c-a d}\right )}{b (b c-a d)^2 g^3}\\ \end{align*}
Mathematica [C] time = 0.516738, size = 443, normalized size = 1.65 \[ -\frac{\frac{B \left (2 B d^2 (a+b x)^2 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac{b (c+d x)}{b c-a d}\right )\right )-2 \text{PolyLog}\left (2,\frac{d (a+b x)}{a d-b c}\right )\right )-2 B d^2 (a+b x)^2 \left (2 \text{PolyLog}\left (2,\frac{b (c+d x)}{b c-a d}\right )+\log (c+d x) \left (2 \log \left (\frac{d (a+b x)}{a d-b c}\right )-\log (c+d x)\right )\right )-4 d^2 (a+b x)^2 \log (a+b x) \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )+4 d^2 (a+b x)^2 \log (c+d x) \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )+2 (b c-a d)^2 \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )+4 d (a+b x) (a d-b c) \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )+B \left (2 d^2 (a+b x)^2 \log (c+d x)+2 d (a+b x) (a d-b c)+(b c-a d)^2-2 d^2 (a+b x)^2 \log (a+b x)\right )-4 B d (a+b x) (-d (a+b x) \log (c+d x)+d (a+b x) \log (a+b x)-a d+b c)\right )}{(b c-a d)^2}+2 \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )^2}{4 b g^3 (a+b x)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.049, size = 1715, normalized size = 6.4 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.46657, size = 1145, normalized size = 4.27 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.0926, size = 767, normalized size = 2.86 \begin{align*} -\frac{{\left (2 \, A^{2} + 2 \, A B + B^{2}\right )} b^{2} c^{2} - 4 \,{\left (A^{2} + 2 \, A B + 2 \, B^{2}\right )} a b c d +{\left (2 \, A^{2} + 6 \, A B + 7 \, B^{2}\right )} a^{2} d^{2} - 2 \,{\left (B^{2} b^{2} d^{2} x^{2} + 2 \, B^{2} a b d^{2} x - B^{2} b^{2} c^{2} + 2 \, B^{2} a b c d\right )} \log \left (\frac{b e x + a e}{d x + c}\right )^{2} - 2 \,{\left ({\left (2 \, A B + 3 \, B^{2}\right )} b^{2} c d -{\left (2 \, A B + 3 \, B^{2}\right )} a b d^{2}\right )} x - 2 \,{\left ({\left (2 \, A B + 3 \, B^{2}\right )} b^{2} d^{2} x^{2} -{\left (2 \, A B + B^{2}\right )} b^{2} c^{2} + 4 \,{\left (A B + B^{2}\right )} a b c d + 2 \,{\left (B^{2} b^{2} c d + 2 \,{\left (A B + B^{2}\right )} a b d^{2}\right )} x\right )} \log \left (\frac{b e x + a e}{d x + c}\right )}{4 \,{\left ({\left (b^{5} c^{2} - 2 \, a b^{4} c d + a^{2} b^{3} d^{2}\right )} g^{3} x^{2} + 2 \,{\left (a b^{4} c^{2} - 2 \, a^{2} b^{3} c d + a^{3} b^{2} d^{2}\right )} g^{3} x +{\left (a^{2} b^{3} c^{2} - 2 \, a^{3} b^{2} c d + a^{4} b d^{2}\right )} g^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 7.64257, size = 892, normalized size = 3.33 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \log \left (\frac{{\left (b x + a\right )} e}{d x + c}\right ) + A\right )}^{2}}{{\left (b g x + a g\right )}^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]